package com.d2rv.offscreen;

import com.d2rv.guide.GoalManager;
import com.d2rv.model.CityModelManager;
import com.d2rv.skybox.SkyboxManager;
import com.d2rv.user.UserManager;
import processing.core.PApplet;

/**
 * This class is the manager of the mono mode offscreen.
 *
 * @author Darrieutort A., Dupouy A., Rossignol L., Van Poucke A.
 */
public class MonoModeManager {

    private OffScreenUserMono offscreenusermono;

    /**
     * Default constructor
     * 
     * 
     * @param parent the current application
     * @param usermanager the manager of the user
     * @param citymodelmanager the manager of the city model
     * @param skyboxmanager the manager of the skybox
     * @param goalmanager the manager of the goal
     */
    public MonoModeManager(PApplet parent, UserManager usermanager, CityModelManager citymodelmanager, SkyboxManager skyboxmanager, GoalManager goalmanager) {
        this.offscreenusermono = new OffScreenUserMono(parent, parent.width / 2, parent.height, usermanager, citymodelmanager, skyboxmanager, goalmanager);
    }

    /**
     *  Calls the draw method of the offscreen user mono
     */
    public void draw() {
        this.offscreenusermono.draw();
    }

    /**
     * Calls the show method the offscreen user mono
     *
     * @param parent  the current application
     * @param x the x coordinate of the left corner of the offscreen
     * @param y the y coordinate of the left corner of the offscreen
     */
    public void show(PApplet parent, int x, int y) {
        this.offscreenusermono.show(parent, x, y);
    }

    /**
     * Returns the offscreen user mono
     * @return the offscreen user mono
     */
    public OffScreenUserMono offscreenusermono() {
        return this.offscreenusermono;
    }
}